/**
 * 通用返回格式
 */
class BaseModel {

    constructor(data, message) {

        if (data) {
            this.data = data;
        }

        if (message) {
            this.message = message;
        }
    }
}
// 成功
class SuccessModel extends BaseModel {
    constructor(data, message) {
        super(data, message);
        this.errno = 0;
    }
}
// 失败
class ErrorModel extends BaseModel {
    constructor(data, message) {
        super(data, message);
        this.errno = -1;
    }
}

module.exports = {
    SuccessModel,
    ErrorModel
}